package com.slife.snap.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.slife.snap.domain.PdSerialportinfo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author Dell
* @description 针对表【pd_serialportinfo】的数据库操作Mapper
* @createDate 2023-07-21 16:54:50
* @Entity com.ilubov.hikvision.domain.PdSerialportinfo
*/
@Mapper
public interface PdSerialportinfoMapper extends BaseMapper<PdSerialportinfo> {
    @Delete("DELETE FROM pd_serialportinfo  WHERE  metertime < NOW() - INTERVAL '5 minutes'")
    public void delete5MinuteAgo();


    @Select("select weight from pd_serialportinfo where metertime > NOW() - INTERVAL '20 second'")
    public List<Double> findList();
}




